/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package proms.net.modelo.helper;

import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import proms.net.modelo.comando.*;
import proms.net.modelo.dao.*;

/**
 *
 * @author Harley
 */
public class PromsHelper {
   private HashMap<String, InterfaceComando> mapacomandos;
   private HttpServletRequest request;
 

    public void setRequest(HttpServletRequest request) {
        this.request = request;
        mapacomandos = new HashMap<String, InterfaceComando>();
        mapacomandos.put("cadastrarCliente", new CadastrarCliente(new ClienteDAO()));
        mapacomandos.put("cadastrarUsuario", new CadastrarUsuario());
        mapacomandos.put("iniciarProms", new ListaClientePro(new ClienteProcessoDAO()));
        mapacomandos.put("cadastrarProcesso", new CadastrarProcesso(new ProcessoDAO()));
       // mapacomandos.put("consultarProcesso", new ConsultarProcesso(new ProcessoDAO()));
        mapacomandos.put("cadastrarAudiencia", new CadastrarAudiencia(new AudienciaDAO()));
        mapacomandos.put("cadastrarPericia", new CadastrarPericia(new PericiaDAO()));
        mapacomandos.put("UsuarioLogin", new UsuarioLogin(new UsuarioDAO()));
        mapacomandos.put("atualizarCliente", new AtualizarCliente(new ClienteDAO()));
        mapacomandos.put("editarCliente", new EditarCliente(new ClienteDAO()));
    }
   public InterfaceComando getComando(){
       return mapacomandos.get(request.getParameter("cmd"));
   }
}

